import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName Distribution1
 * @Description: TODO
 * @Author 远志 zhangsong@cskaoyan.onaliyun.com
 * @Date 2023/2/10 9:00
 * @Version V1.0
 **/
public class Distribution1 {

    private static final int CAPACITY = 10000;

    public static void main(String[] args) {

        Map<Integer, ArrayList<Integer>> data = new HashMap<>();

        for (int i = 0; i < CAPACITY; i++) {
            //产生10000个随机数，随机数的范围是0-10000 [0,1)
            //Integer number = (int) (Math.random() * CAPACITY);
            int index = i % 2500;
            ArrayList<Integer> integers = data.get(index);
            if(integers == null){
                integers = new ArrayList<>();
                data.put(index, integers);
            }
            integers.add(i);
        }
        System.out.println("数据存储完毕");
        System.out.println(data);
    }
}
